:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --success-color: #4caf50;
    --danger-color: #f44336;
    --warning-color: #ff9800;
    --info-color: #2196f3;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    margin: 0; 
    padding: 0; 
    background-color: #f5f5f5; 
    color: #333;
}

.app-container {
    max-width: 1200px; 
    margin: 20px auto; 
    background: white; 
    padding: 25px; 
    border-radius: 10px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.app-header {
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.app-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 5px;
}

.upload-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px dashed #ccc;
    transition: all 0.3s ease;
}

.upload-section.drag-over {
    background-color: rgba(67, 97, 238, 0.1);
    border-color: var(--primary-color);
}

.upload-area {
    text-align: center;
    padding: 30px 0;
    cursor: pointer;
}

.upload-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.file-input-wrapper input[type=file] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-list {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.file-list th, .file-list td {
    border: 1px solid #eee;
    padding: 12px 15px;
    text-align: left;
}

.file-list th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.file-list tr:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

.file-name {
    display: flex;
    align-items: center;
}

.file-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    color: var(--primary-color);
}

.file-actions {
    display: flex;
    gap: 5px;
}

.file-actions button {
    padding: 4px 8px;
    font-size: 0.85rem;
}

.search-box {
    position: relative;
    margin-bottom: 15px;
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

#searchInput {
    width: 100%;
    padding: 10px 10px 10px 35px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.9rem;
}

.file-type-filter {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 5px 10px;
    background: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #e9e9e9;
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.progress-container {
    margin-top: 15px;
    display: none;
}

.progress-bar {
    height: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-inner {
    height: 100%;
    background-color: var(--primary-color);
    width: 0;
    transition: width 0.3s;
}

.progress-text {
    font-size: 0.85rem;
    color: #666;
    display: none;
}

.status-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    display: none;
}

.status-message.success {
    background-color: rgba(76, 175, 80, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.status-message.error {
    background-color: rgba(244, 67, 54, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(244, 67, 54, 0.2);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    position: relative;
    margin: 5% auto;
    width: 80%;
    max-width: 900px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    max-height: 80vh;
    overflow: auto;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    color: white;
    cursor: pointer;
    z-index: 1001;
}

.preview-image {
    width: 100%;
    height: auto;
    display: block;
}

.preview-document {
    width: 100%;
    height: 80vh;
    border: none;
}

/* 选中文件预览样式 */
.selected-file-preview {
    margin-top: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
    display: none;
}

.file-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.file-preview-header h5 {
    margin: 0;
    font-size: 1rem;
    color: #555;
}

.file-preview-content {
    padding: 15px;
}

.file-preview-info {
    display: flex;
    align-items: center;
}

.file-preview-icon {
    font-size: 32px;
    color: var(--primary-color);
    margin-right: 15px;
}

.file-preview-details {
    flex: 1;
}

.file-preview-name {
    font-weight: 500;
    margin-bottom: 5px;
    word-break: break-all;
}

.file-preview-meta {
    font-size: 0.85rem;
    color: #666;
}

.file-preview-image-container {
    margin-top: 15px;
    text-align: center;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 10px;
    background-color: #f9f9f9;
}

.file-preview-image {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .app-container {
        margin: 10px;
        padding: 15px;
    }
    
    .file-type-filter {
        justify-content: flex-start;
        margin-top: 10px;
    }
    
    .file-actions {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}